#! /usr/bin/env python

from port_authority.handler import HandlerBase
from twisted.internet import reactor
from twisted.web2 import server, channel, wsgi

class WSGIServer(HandlerBase):

    def run(self):
        """
        TODO: This makes no sense to me and so therefore isn't read to 
        actually run:

        res = wsgi.WSGIResource(self.application)
        site = server.Site(res)
        reactor.listenTCP(self.port, 
                          channel.HTTPFactory(site))
        reactor.run()
        """
